import request from "@/utils/request.ts";
import {formatPaginatedResult} from "@/utils/format.ts";

const BASE_PATH = '/tourist/scenic';

// 获取重点景区汇总数据
export function getYoyMomCountByZoneCode(params: any): any {
    return request(`${BASE_PATH}/getYoyMomCountByZoneCode`, {
        params,
    });
}

// 客流趋势同比环比和
export function getYoyMomTrendByZoneCode(params: any) {
    return request(`${BASE_PATH}/getYoyMomTrendByZoneCode`, {
        params,
    });
}

// 景区客流topN
export function getScenicTopN(params: any) {
    return request(`${BASE_PATH}/getScenicTopN`, {
        params,
    });
}

//获取行政区划下 景区汇总客流趋势
export function getScenicAreaTrend(params: any) {
    return request(`${BASE_PATH}/getFocusScenicTrend`, {
        params,
    });
}

// 景区客流-按区域分析
export function getScenicKlRealMonitorList(params: any) {
    return request(`${BASE_PATH}/getKlRealMonitorList`, {
        params,
    });
}

// 景区客流监测-获取当前客流量
export function getScenicCurrentPassenger(params: any) {
    return request(`${BASE_PATH}/getRealCountByZoneCode`, {
        params,
    });
}

// 景区客流监测-获取平均饱和度
export function getSaturationByZoneCode(params: any) {
    return request(`${BASE_PATH}/getSaturationByZoneCode`, {
        params,
    });
}

// 景区客流监测-景区客流量查询
export function getScenicPassengerPageList(params: any) {
    return request(`${BASE_PATH}/realPage`, {
        method: 'get',
        params,
    }).then((res:any) => formatPaginatedResult(res));
}

// 景区客流监测-根据饱和度获取景区数量
export function getSaturationCount(params: any) {
    return request(`${BASE_PATH}/getSaturationCount`, {
        params,
    });
}